home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_xemacs.idb / usr / freeware / lib / xemacs-20.4 / info / lispref.info-2.z / lispref.info-2
Encoding:
GNU Info File  |  1998-05-21  |  49.5 KB  |  1,166 lines

  1. This is Info file ../../info/lispref.info, produced by Makeinfo version
  2. 1.68 from the input file lispref.texi.
  3.  
  4.    Edition History:
  5.  
  6.    GNU Emacs Lisp Reference Manual Second Edition (v2.01), May 1993 GNU
  7. Emacs Lisp Reference Manual Further Revised (v2.02), August 1993 Lucid
  8. Emacs Lisp Reference Manual (for 19.10) First Edition, March 1994
  9. XEmacs Lisp Programmer's Manual (for 19.12) Second Edition, April 1995
  10. GNU Emacs Lisp Reference Manual v2.4, June 1995 XEmacs Lisp
  11. Programmer's Manual (for 19.13) Third Edition, July 1995 XEmacs Lisp
  12. Reference Manual (for 19.14 and 20.0) v3.1, March 1996 XEmacs Lisp
  13. Reference Manual (for 19.15 and 20.1, 20.2) v3.2, April, May 1997
  14.  
  15.    Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995 Free Software
  16. Foundation, Inc.  Copyright (C) 1994, 1995 Sun Microsystems, Inc.
  17. Copyright (C) 1995, 1996 Ben Wing.
  18.  
  19.    Permission is granted to make and distribute verbatim copies of this
  20. manual provided the copyright notice and this permission notice are
  21. preserved on all copies.
  22.  
  23.    Permission is granted to copy and distribute modified versions of
  24. this manual under the conditions for verbatim copying, provided that the
  25. entire resulting derived work is distributed under the terms of a
  26. permission notice identical to this one.
  27.  
  28.    Permission is granted to copy and distribute translations of this
  29. manual into another language, under the above conditions for modified
  30. versions, except that this permission notice may be stated in a
  31. translation approved by the Foundation.
  32.  
  33.    Permission is granted to copy and distribute modified versions of
  34. this manual under the conditions for verbatim copying, provided also
  35. that the section entitled "GNU General Public License" is included
  36. exactly as in the original, and provided that the entire resulting
  37. derived work is distributed under the terms of a permission notice
  38. identical to this one.
  39.  
  40.    Permission is granted to copy and distribute translations of this
  41. manual into another language, under the above conditions for modified
  42. versions, except that the section entitled "GNU General Public License"
  43. may be included in a translation approved by the Free Software
  44. Foundation instead of in the original English.
  45.  
  46. 
  47. File: lispref.info,  Node: Copying,  Next: Introduction,  Prev: Top,  Up: Top
  48.  
  49. GNU GENERAL PUBLIC LICENSE
  50. **************************
  51.  
  52.                          Version 2, June 1991
  53.  
  54.      Copyright (C) 1989, 1991 Free Software Foundation, Inc.
  55.      675 Mass Ave, Cambridge, MA 02139, USA
  56.      
  57.      Everyone is permitted to copy and distribute verbatim copies
  58.      of this license document, but changing it is not allowed.
  59.  
  60. Preamble
  61. ========
  62.  
  63.    The licenses for most software are designed to take away your
  64. freedom to share and change it.  By contrast, the GNU General Public
  65. License is intended to guarantee your freedom to share and change free
  66. software--to make sure the software is free for all its users.  This
  67. General Public License applies to most of the Free Software
  68. Foundation's software and to any other program whose authors commit to
  69. using it.  (Some other Free Software Foundation software is covered by
  70. the GNU Library General Public License instead.)  You can apply it to
  71. your programs, too.
  72.  
  73.    When we speak of free software, we are referring to freedom, not
  74. price.  Our General Public Licenses are designed to make sure that you
  75. have the freedom to distribute copies of free software (and charge for
  76. this service if you wish), that you receive source code or can get it
  77. if you want it, that you can change the software or use pieces of it in
  78. new free programs; and that you know you can do these things.
  79.  
  80.    To protect your rights, we need to make restrictions that forbid
  81. anyone to deny you these rights or to ask you to surrender the rights.
  82. These restrictions translate to certain responsibilities for you if you
  83. distribute copies of the software, or if you modify it.
  84.  
  85.    For example, if you distribute copies of such a program, whether
  86. gratis or for a fee, you must give the recipients all the rights that
  87. you have.  You must make sure that they, too, receive or can get the
  88. source code.  And you must show them these terms so they know their
  89. rights.
  90.  
  91.    We protect your rights with two steps: (1) copyright the software,
  92. and (2) offer you this license which gives you legal permission to copy,
  93. distribute and/or modify the software.
  94.  
  95.    Also, for each author's protection and ours, we want to make certain
  96. that everyone understands that there is no warranty for this free
  97. software.  If the software is modified by someone else and passed on, we
  98. want its recipients to know that what they have is not the original, so
  99. that any problems introduced by others will not reflect on the original
  100. authors' reputations.
  101.  
  102.    Finally, any free program is threatened constantly by software
  103. patents.  We wish to avoid the danger that redistributors of a free
  104. program will individually obtain patent licenses, in effect making the
  105. program proprietary.  To prevent this, we have made it clear that any
  106. patent must be licensed for everyone's free use or not licensed at all.
  107.  
  108.    The precise terms and conditions for copying, distribution and
  109. modification follow.
  110.  
  111.     TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
  112.  
  113.   0. This License applies to any program or other work which contains a
  114.      notice placed by the copyright holder saying it may be distributed
  115.      under the terms of this General Public License.  The "Program",
  116.      below, refers to any such program or work, and a "work based on
  117.      the Program" means either the Program or any derivative work under
  118.      copyright law: that is to say, a work containing the Program or a
  119.      portion of it, either verbatim or with modifications and/or
  120.      translated into another language.  (Hereinafter, translation is
  121.      included without limitation in the term "modification".)  Each
  122.      licensee is addressed as "you".
  123.  
  124.      Activities other than copying, distribution and modification are
  125.      not covered by this License; they are outside its scope.  The act
  126.      of running the Program is not restricted, and the output from the
  127.      Program is covered only if its contents constitute a work based on
  128.      the Program (independent of having been made by running the
  129.      Program).  Whether that is true depends on what the Program does.
  130.  
  131.   1. You may copy and distribute verbatim copies of the Program's
  132.      source code as you receive it, in any medium, provided that you
  133.      conspicuously and appropriately publish on each copy an appropriate
  134.      copyright notice and disclaimer of warranty; keep intact all the
  135.      notices that refer to this License and to the absence of any
  136.      warranty; and give any other recipients of the Program a copy of
  137.      this License along with the Program.
  138.  
  139.      You may charge a fee for the physical act of transferring a copy,
  140.      and you may at your option offer warranty protection in exchange
  141.      for a fee.
  142.  
  143.   2. You may modify your copy or copies of the Program or any portion
  144.      of it, thus forming a work based on the Program, and copy and
  145.      distribute such modifications or work under the terms of Section 1
  146.      above, provided that you also meet all of these conditions:
  147.  
  148.        a. You must cause the modified files to carry prominent notices
  149.           stating that you changed the files and the date of any change.
  150.  
  151.        b. You must cause any work that you distribute or publish, that
  152.           in whole or in part contains or is derived from the Program
  153.           or any part thereof, to be licensed as a whole at no charge
  154.           to all third parties under the terms of this License.
  155.  
  156.        c. If the modified program normally reads commands interactively
  157.           when run, you must cause it, when started running for such
  158.           interactive use in the most ordinary way, to print or display
  159.           an announcement including an appropriate copyright notice and
  160.           a notice that there is no warranty (or else, saying that you
  161.           provide a warranty) and that users may redistribute the
  162.           program under these conditions, and telling the user how to
  163.           view a copy of this License.  (Exception: if the Program
  164.           itself is interactive but does not normally print such an
  165.           announcement, your work based on the Program is not required
  166.           to print an announcement.)
  167.  
  168.      These requirements apply to the modified work as a whole.  If
  169.      identifiable sections of that work are not derived from the
  170.      Program, and can be reasonably considered independent and separate
  171.      works in themselves, then this License, and its terms, do not
  172.      apply to those sections when you distribute them as separate
  173.      works.  But when you distribute the same sections as part of a
  174.      whole which is a work based on the Program, the distribution of
  175.      the whole must be on the terms of this License, whose permissions
  176.      for other licensees extend to the entire whole, and thus to each
  177.      and every part regardless of who wrote it.
  178.  
  179.      Thus, it is not the intent of this section to claim rights or
  180.      contest your rights to work written entirely by you; rather, the
  181.      intent is to exercise the right to control the distribution of
  182.      derivative or collective works based on the Program.
  183.  
  184.      In addition, mere aggregation of another work not based on the
  185.      Program with the Program (or with a work based on the Program) on
  186.      a volume of a storage or distribution medium does not bring the
  187.      other work under the scope of this License.
  188.  
  189.   3. You may copy and distribute the Program (or a work based on it,
  190.      under Section 2) in object code or executable form under the terms
  191.      of Sections 1 and 2 above provided that you also do one of the
  192.      following:
  193.  
  194.        a. Accompany it with the complete corresponding machine-readable
  195.           source code, which must be distributed under the terms of
  196.           Sections 1 and 2 above on a medium customarily used for
  197.           software interchange; or,
  198.  
  199.        b. Accompany it with a written offer, valid for at least three
  200.           years, to give any third party, for a charge no more than your
  201.           cost of physically performing source distribution, a complete
  202.           machine-readable copy of the corresponding source code, to be
  203.           distributed under the terms of Sections 1 and 2 above on a
  204.           medium customarily used for software interchange; or,
  205.  
  206.        c. Accompany it with the information you received as to the offer
  207.           to distribute corresponding source code.  (This alternative is
  208.           allowed only for noncommercial distribution and only if you
  209.           received the program in object code or executable form with
  210.           such an offer, in accord with Subsection b above.)
  211.  
  212.      The source code for a work means the preferred form of the work for
  213.      making modifications to it.  For an executable work, complete
  214.      source code means all the source code for all modules it contains,
  215.      plus any associated interface definition files, plus the scripts
  216.      used to control compilation and installation of the executable.
  217.      However, as a special exception, the source code distributed need
  218.      not include anything that is normally distributed (in either
  219.      source or binary form) with the major components (compiler,
  220.      kernel, and so on) of the operating system on which the executable
  221.      runs, unless that component itself accompanies the executable.
  222.  
  223.      If distribution of executable or object code is made by offering
  224.      access to copy from a designated place, then offering equivalent
  225.      access to copy the source code from the same place counts as
  226.      distribution of the source code, even though third parties are not
  227.      compelled to copy the source along with the object code.
  228.  
  229.   4. You may not copy, modify, sublicense, or distribute the Program
  230.      except as expressly provided under this License.  Any attempt
  231.      otherwise to copy, modify, sublicense or distribute the Program is
  232.      void, and will automatically terminate your rights under this
  233.      License.  However, parties who have received copies, or rights,
  234.      from you under this License will not have their licenses
  235.      terminated so long as such parties remain in full compliance.
  236.  
  237.   5. You are not required to accept this License, since you have not
  238.      signed it.  However, nothing else grants you permission to modify
  239.      or distribute the Program or its derivative works.  These actions
  240.      are prohibited by law if you do not accept this License.
  241.      Therefore, by modifying or distributing the Program (or any work
  242.      based on the Program), you indicate your acceptance of this
  243.      License to do so, and all its terms and conditions for copying,
  244.      distributing or modifying the Program or works based on it.
  245.  
  246.   6. Each time you redistribute the Program (or any work based on the
  247.      Program), the recipient automatically receives a license from the
  248.      original licensor to copy, distribute or modify the Program
  249.      subject to these terms and conditions.  You may not impose any
  250.      further restrictions on the recipients' exercise of the rights
  251.      granted herein.  You are not responsible for enforcing compliance
  252.      by third parties to this License.
  253.  
  254.   7. If, as a consequence of a court judgment or allegation of patent
  255.      infringement or for any other reason (not limited to patent
  256.      issues), conditions are imposed on you (whether by court order,
  257.      agreement or otherwise) that contradict the conditions of this
  258.      License, they do not excuse you from the conditions of this
  259.      License.  If you cannot distribute so as to satisfy simultaneously
  260.      your obligations under this License and any other pertinent
  261.      obligations, then as a consequence you may not distribute the
  262.      Program at all.  For example, if a patent license would not permit
  263.      royalty-free redistribution of the Program by all those who
  264.      receive copies directly or indirectly through you, then the only
  265.      way you could satisfy both it and this License would be to refrain
  266.      entirely from distribution of the Program.
  267.  
  268.      If any portion of this section is held invalid or unenforceable
  269.      under any particular circumstance, the balance of the section is
  270.      intended to apply and the section as a whole is intended to apply
  271.      in other circumstances.
  272.  
  273.      It is not the purpose of this section to induce you to infringe any
  274.      patents or other property right claims or to contest validity of
  275.      any such claims; this section has the sole purpose of protecting
  276.      the integrity of the free software distribution system, which is
  277.      implemented by public license practices.  Many people have made
  278.      generous contributions to the wide range of software distributed
  279.      through that system in reliance on consistent application of that
  280.      system; it is up to the author/donor to decide if he or she is
  281.      willing to distribute software through any other system and a
  282.      licensee cannot impose that choice.
  283.  
  284.      This section is intended to make thoroughly clear what is believed
  285.      to be a consequence of the rest of this License.
  286.  
  287.   8. If the distribution and/or use of the Program is restricted in
  288.      certain countries either by patents or by copyrighted interfaces,
  289.      the original copyright holder who places the Program under this
  290.      License may add an explicit geographical distribution limitation
  291.      excluding those countries, so that distribution is permitted only
  292.      in or among countries not thus excluded.  In such case, this
  293.      License incorporates the limitation as if written in the body of
  294.      this License.
  295.  
  296.   9. The Free Software Foundation may publish revised and/or new
  297.      versions of the General Public License from time to time.  Such
  298.      new versions will be similar in spirit to the present version, but
  299.      may differ in detail to address new problems or concerns.
  300.  
  301.      Each version is given a distinguishing version number.  If the
  302.      Program specifies a version number of this License which applies
  303.      to it and "any later version", you have the option of following
  304.      the terms and conditions either of that version or of any later
  305.      version published by the Free Software Foundation.  If the Program
  306.      does not specify a version number of this License, you may choose
  307.      any version ever published by the Free Software Foundation.
  308.  
  309.  10. If you wish to incorporate parts of the Program into other free
  310.      programs whose distribution conditions are different, write to the
  311.      author to ask for permission.  For software which is copyrighted
  312.      by the Free Software Foundation, write to the Free Software
  313.      Foundation; we sometimes make exceptions for this.  Our decision
  314.      will be guided by the two goals of preserving the free status of
  315.      all derivatives of our free software and of promoting the sharing
  316.      and reuse of software generally.
  317.  
  318.                                 NO WARRANTY
  319.  
  320.  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO
  321.      WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE
  322.      LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
  323.      HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT
  324.      WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT
  325.      NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
  326.      FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS TO THE
  327.      QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
  328.      PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY
  329.      SERVICING, REPAIR OR CORRECTION.
  330.  
  331.  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
  332.      WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY
  333.      MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE
  334.      LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL,
  335.      INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR
  336.      INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
  337.      DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU
  338.      OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY
  339.      OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN
  340.      ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
  341.  
  342.                       END OF TERMS AND CONDITIONS
  343.  
  344. How to Apply These Terms to Your New Programs
  345. =============================================
  346.  
  347.    If you develop a new program, and you want it to be of the greatest
  348. possible use to the public, the best way to achieve this is to make it
  349. free software which everyone can redistribute and change under these
  350. terms.
  351.  
  352.    To do so, attach the following notices to the program.  It is safest
  353. to attach them to the start of each source file to most effectively
  354. convey the exclusion of warranty; and each file should have at least
  355. the "copyright" line and a pointer to where the full notice is found.
  356.  
  357.      ONE LINE TO GIVE THE PROGRAM'S NAME AND AN IDEA OF WHAT IT DOES.
  358.      Copyright (C) 19YY  NAME OF AUTHOR
  359.      
  360.      This program is free software; you can redistribute it and/or
  361.      modify it under the terms of the GNU General Public License
  362.      as published by the Free Software Foundation; either version 2
  363.      of the License, or (at your option) any later version.
  364.      
  365.      This program is distributed in the hope that it will be useful,
  366.      but WITHOUT ANY WARRANTY; without even the implied warranty of
  367.      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  368.      GNU General Public License for more details.
  369.      
  370.      You should have received a copy of the GNU General Public License
  371.      along with this program; if not, write to the Free Software
  372.      Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  373.  
  374.    Also add information on how to contact you by electronic and paper
  375. mail.
  376.  
  377.    If the program is interactive, make it output a short notice like
  378. this when it starts in an interactive mode:
  379.  
  380.      Gnomovision version 69, Copyright (C) 19YY NAME OF AUTHOR
  381.      Gnomovision comes with ABSOLUTELY NO WARRANTY; for details
  382.      type `show w'.  This is free software, and you are welcome
  383.      to redistribute it under certain conditions; type `show c'
  384.      for details.
  385.  
  386.    The hypothetical commands `show w' and `show c' should show the
  387. appropriate parts of the General Public License.  Of course, the
  388. commands you use may be called something other than `show w' and `show
  389. c'; they could even be mouse-clicks or menu items--whatever suits your
  390. program.
  391.  
  392.    You should also get your employer (if you work as a programmer) or
  393. your school, if any, to sign a "copyright disclaimer" for the program,
  394. if necessary.  Here is a sample; alter the names:
  395.  
  396.      Yoyodyne, Inc., hereby disclaims all copyright
  397.      interest in the program `Gnomovision'
  398.      (which makes passes at compilers) written
  399.      by James Hacker.
  400.      
  401.      SIGNATURE OF TY COON, 1 April 1989
  402.      Ty Coon, President of Vice
  403.  
  404.    This General Public License does not permit incorporating your
  405. program into proprietary programs.  If your program is a subroutine
  406. library, you may consider it more useful to permit linking proprietary
  407. applications with the library.  If this is what you want to do, use the
  408. GNU Library General Public License instead of this License.
  409.  
  410. 
  411. File: lispref.info,  Node: Introduction,  Next: Lisp Data Types,  Prev: Copying,  Up: Top
  412.  
  413. Introduction
  414. ************
  415.  
  416.    Most of the XEmacs text editor is written in the programming
  417. language called XEmacs Lisp.  You can write new code in XEmacs Lisp and
  418. install it as an extension to the editor.  However, XEmacs Lisp is more
  419. than a mere "extension language"; it is a full computer programming
  420. language in its own right.  You can use it as you would any other
  421. programming language.
  422.  
  423.    Because XEmacs Lisp is designed for use in an editor, it has special
  424. features for scanning and parsing text as well as features for handling
  425. files, buffers, displays, subprocesses, and so on.  XEmacs Lisp is
  426. closely integrated with the editing facilities; thus, editing commands
  427. are functions that can also conveniently be called from Lisp programs,
  428. and parameters for customization are ordinary Lisp variables.
  429.  
  430.    This manual describes XEmacs Lisp, presuming considerable familiarity
  431. with the use of XEmacs for editing.  (See `The XEmacs Reference
  432. Manual', for this basic information.)  Generally speaking, the earlier
  433. chapters describe features of XEmacs Lisp that have counterparts in many
  434. programming languages, and later chapters describe features that are
  435. peculiar to XEmacs Lisp or relate specifically to editing.
  436.  
  437.    This is edition 3.2.
  438.  
  439. * Menu:
  440.  
  441. * Caveats::             Flaws and a request for help.
  442. * Lisp History::        XEmacs Lisp is descended from Maclisp.
  443. * Conventions::         How the manual is formatted.
  444. * Acknowledgements::    The authors, editors, and sponsors of this manual.
  445.  
  446. 
  447. File: lispref.info,  Node: Caveats,  Next: Lisp History,  Up: Introduction
  448.  
  449. Caveats
  450. =======
  451.  
  452.    This manual has gone through numerous drafts.  It is nearly complete
  453. but not flawless.  There are a few topics that are not covered, either
  454. because we consider them secondary (such as most of the individual
  455. modes) or because they are yet to be written.  Because we are not able
  456. to deal with them completely, we have left out several parts
  457. intentionally.  This includes most information about usage on VMS.
  458.  
  459.    The manual should be fully correct in what it does cover, and it is
  460. therefore open to criticism on anything it says--from specific examples
  461. and descriptive text, to the ordering of chapters and sections.  If
  462. something is confusing, or you find that you have to look at the sources
  463. or experiment to learn something not covered in the manual, then perhaps
  464. the manual should be fixed.  Please let us know.
  465.  
  466.    As you use this manual, we ask that you send corrections as soon as
  467. you find them.  If you think of a simple, real life example for a
  468. function or group of functions, please make an effort to write it up
  469. and send it in.  Please reference any comments to the node name and
  470. function or variable name, as appropriate.  Also state the number of
  471. the edition which you are criticizing.
  472.  
  473.    This manual was originally written for FSF Emacs 19 and was updated
  474. by Ben Wing (wing@666.com) for Lucid Emacs 19.10 and later for XEmacs
  475. 19.12, 19.13, 19.14, and 20.0.  It was further updated by the XEmacs
  476. Development Team for 19.15 and 20.1.  Please send comments and
  477. corrections relating to XEmacs-specific portions of this manual to
  478.      xemacs@xemacs.org
  479.  
  480.    or post to the newsgroup
  481.      comp.emacs.xemacs
  482.  
  483.       --Ben Wing
  484.  
  485. 
  486. File: lispref.info,  Node: Lisp History,  Next: Conventions,  Prev: Caveats,  Up: Introduction
  487.  
  488. Lisp History
  489. ============
  490.  
  491.    Lisp (LISt Processing language) was first developed in the late
  492. 1950's at the Massachusetts Institute of Technology for research in
  493. artificial intelligence.  The great power of the Lisp language makes it
  494. superior for other purposes as well, such as writing editing commands.
  495.  
  496.    Dozens of Lisp implementations have been built over the years, each
  497. with its own idiosyncrasies.  Many of them were inspired by Maclisp,
  498. which was written in the 1960's at MIT's Project MAC.  Eventually the
  499. implementors of the descendants of Maclisp came together and developed a
  500. standard for Lisp systems, called Common Lisp.
  501.  
  502.    XEmacs Lisp is largely inspired by Maclisp, and a little by Common
  503. Lisp.  If you know Common Lisp, you will notice many similarities.
  504. However, many of the features of Common Lisp have been omitted or
  505. simplified in order to reduce the memory requirements of XEmacs.
  506. Sometimes the simplifications are so drastic that a Common Lisp user
  507. might be very confused.  We will occasionally point out how XEmacs Lisp
  508. differs from Common Lisp.  If you don't know Common Lisp, don't worry
  509. about it; this manual is self-contained.
  510.  
  511. 
  512. File: lispref.info,  Node: Conventions,  Next: Acknowledgements,  Prev: Lisp History,  Up: Introduction
  513.  
  514. Conventions
  515. ===========
  516.  
  517.    This section explains the notational conventions that are used in
  518. this manual.  You may want to skip this section and refer back to it
  519. later.
  520.  
  521. * Menu:
  522.  
  523. * Some Terms::               Explanation of terms we use in this manual.
  524. * nil and t::                How the symbols `nil' and `t' are used.
  525. * Evaluation Notation::      The format we use for examples of evaluation.
  526. * Printing Notation::        The format we use for examples that print output.
  527. * Error Messages::           The format we use for examples of errors.
  528. * Buffer Text Notation::     The format we use for buffer contents in examples.
  529. * Format of Descriptions::   Notation for describing functions, variables, etc.
  530.  
  531. 
  532. File: lispref.info,  Node: Some Terms,  Next: nil and t,  Up: Conventions
  533.  
  534. Some Terms
  535. ----------
  536.  
  537.    Throughout this manual, the phrases "the Lisp reader" and "the Lisp
  538. printer" are used to refer to those routines in Lisp that convert
  539. textual representations of Lisp objects into actual Lisp objects, and
  540. vice versa.  *Note Printed Representation::, for more details.  You, the
  541. person reading this manual, are thought of as "the programmer" and are
  542. addressed as "you".  "The user" is the person who uses Lisp programs,
  543. including those you write.
  544.  
  545.    Examples of Lisp code appear in this font or form: `(list 1 2 3)'.
  546. Names that represent arguments or metasyntactic variables appear in
  547. this font or form: FIRST-NUMBER.
  548.  
  549. 
  550. File: lispref.info,  Node: nil and t,  Next: Evaluation Notation,  Prev: Some Terms,  Up: Conventions
  551.  
  552. `nil' and `t'
  553. -------------
  554.  
  555.    In Lisp, the symbol `nil' has three separate meanings: it is a
  556. symbol with the name `nil'; it is the logical truth value FALSE; and it
  557. is the empty list--the list of zero elements.  When used as a variable,
  558. `nil' always has the value `nil'.
  559.  
  560.    As far as the Lisp reader is concerned, `()' and `nil' are
  561. identical: they stand for the same object, the symbol `nil'.  The
  562. different ways of writing the symbol are intended entirely for human
  563. readers.  After the Lisp reader has read either `()' or `nil', there is
  564. no way to determine which representation was actually written by the
  565. programmer.
  566.  
  567.    In this manual, we use `()' when we wish to emphasize that it means
  568. the empty list, and we use `nil' when we wish to emphasize that it
  569. means the truth value FALSE.  That is a good convention to use in Lisp
  570. programs also.
  571.  
  572.      (cons 'foo ())                ; Emphasize the empty list
  573.      (not nil)                     ; Emphasize the truth value FALSE
  574.  
  575.    In contexts where a truth value is expected, any non-`nil' value is
  576. considered to be TRUE.  However, `t' is the preferred way to represent
  577. the truth value TRUE.  When you need to choose a value which represents
  578. TRUE, and there is no other basis for choosing, use `t'.  The symbol
  579. `t' always has value `t'.
  580.  
  581.    In XEmacs Lisp, `nil' and `t' are special symbols that always
  582. evaluate to themselves.  This is so that you do not need to quote them
  583. to use them as constants in a program.  An attempt to change their
  584. values results in a `setting-constant' error.  *Note Accessing
  585. Variables::.
  586.  
  587. 
  588. File: lispref.info,  Node: Evaluation Notation,  Next: Printing Notation,  Prev: nil and t,  Up: Conventions
  589.  
  590. Evaluation Notation
  591. -------------------
  592.  
  593.    A Lisp expression that you can evaluate is called a "form".
  594. Evaluating a form always produces a result, which is a Lisp object.  In
  595. the examples in this manual, this is indicated with `=>':
  596.  
  597.      (car '(1 2))
  598.           => 1
  599.  
  600. You can read this as "`(car '(1 2))' evaluates to 1".
  601.  
  602.    When a form is a macro call, it expands into a new form for Lisp to
  603. evaluate.  We show the result of the expansion with `==>'.  We may or
  604. may not show the actual result of the evaluation of the expanded form.
  605.  
  606.      (news-cadr '(a b c))
  607.           ==> (car (cdr '(a b c)))
  608.           => b
  609.  
  610.    Sometimes to help describe one form we show another form that
  611. produces identical results.  The exact equivalence of two forms is
  612. indicated with `=='.
  613.  
  614.      (cons 'a nil) == (list 'a)
  615.  
  616. 
  617. File: lispref.info,  Node: Printing Notation,  Next: Error Messages,  Prev: Evaluation Notation,  Up: Conventions
  618.  
  619. Printing Notation
  620. -----------------
  621.  
  622.    Many of the examples in this manual print text when they are
  623. evaluated.  If you execute example code in a Lisp Interaction buffer
  624. (such as the buffer `*scratch*'), the printed text is inserted into the
  625. buffer.  If you execute the example by other means (such as by
  626. evaluating the function `eval-region'), the printed text is displayed
  627. in the echo area.  You should be aware that text displayed in the echo
  628. area is truncated to a single line.
  629.  
  630.    Examples in this manual indicate printed text with `-|',
  631. irrespective of where that text goes.  The value returned by evaluating
  632. the form (here `bar') follows on a separate line.
  633.  
  634.      (progn (print 'foo) (print 'bar))
  635.           -| foo
  636.           -| bar
  637.           => bar
  638.  
  639. 
  640. File: lispref.info,  Node: Error Messages,  Next: Buffer Text Notation,  Prev: Printing Notation,  Up: Conventions
  641.  
  642. Error Messages
  643. --------------
  644.  
  645.    Some examples signal errors.  This normally displays an error message
  646. in the echo area.  We show the error message on a line starting with
  647. `error-->'.  Note that `error-->' itself does not appear in the echo
  648. area.
  649.  
  650.      (+ 23 'x)
  651.      error--> Wrong type argument: integer-or-marker-p, x
  652.  
  653. 
  654. File: lispref.info,  Node: Buffer Text Notation,  Next: Format of Descriptions,  Prev: Error Messages,  Up: Conventions
  655.  
  656. Buffer Text Notation
  657. --------------------
  658.  
  659.    Some examples show modifications to text in a buffer, with "before"
  660. and "after" versions of the text.  These examples show the contents of
  661. the buffer in question between two lines of dashes containing the buffer
  662. name.  In addition, `-!-' indicates the location of point.  (The symbol
  663. for point, of course, is not part of the text in the buffer; it
  664. indicates the place *between* two characters where point is located.)
  665.  
  666.      ---------- Buffer: foo ----------
  667.      This is the -!-contents of foo.
  668.      ---------- Buffer: foo ----------
  669.      
  670.      (insert "changed ")
  671.           => nil
  672.      ---------- Buffer: foo ----------
  673.      This is the changed -!-contents of foo.
  674.      ---------- Buffer: foo ----------
  675.  
  676. 
  677. File: lispref.info,  Node: Format of Descriptions,  Prev: Buffer Text Notation,  Up: Conventions
  678.  
  679. Format of Descriptions
  680. ----------------------
  681.  
  682.    Functions, variables, macros, commands, user options, and special
  683. forms are described in this manual in a uniform format.  The first line
  684. of a description contains the name of the item followed by its
  685. arguments, if any.  The category--function, variable, or
  686. whatever--appears at the beginning of the line.  The description
  687. follows on succeeding lines, sometimes with examples.
  688.  
  689. * Menu:
  690.  
  691. * A Sample Function Description::       A description of an imaginary
  692.                                           function, `foo'.
  693. * A Sample Variable Description::       A description of an imaginary
  694.                                           variable,
  695.                                           `electric-future-map'.
  696.  
  697. 
  698. File: lispref.info,  Node: A Sample Function Description,  Next: A Sample Variable Description,  Up: Format of Descriptions
  699.  
  700. A Sample Function Description
  701. .............................
  702.  
  703.    In a function description, the name of the function being described
  704. appears first.  It is followed on the same line by a list of parameters.
  705. The names used for the parameters are also used in the body of the
  706. description.
  707.  
  708.    The appearance of the keyword `&optional' in the parameter list
  709. indicates that the arguments for subsequent parameters may be omitted
  710. (omitted parameters default to `nil').  Do not write `&optional' when
  711. you call the function.
  712.  
  713.    The keyword `&rest' (which will always be followed by a single
  714. parameter) indicates that any number of arguments can follow.  The value
  715. of the single following parameter will be a list of all these arguments.
  716. Do not write `&rest' when you call the function.
  717.  
  718.    Here is a description of an imaginary function `foo':
  719.  
  720.  - Function: foo INTEGER1 &optional INTEGER2 &rest INTEGERS
  721.      The function `foo' subtracts INTEGER1 from INTEGER2, then adds all
  722.      the rest of the arguments to the result.  If INTEGER2 is not
  723.      supplied, then the number 19 is used by default.
  724.  
  725.           (foo 1 5 3 9)
  726.                => 16
  727.           (foo 5)
  728.                => 14
  729.  
  730.      More generally,
  731.  
  732.           (foo W X Y...)
  733.           ==
  734.           (+ (- X W) Y...)
  735.  
  736.    Any parameter whose name contains the name of a type (e.g., INTEGER,
  737. INTEGER1 or BUFFER) is expected to be of that type.  A plural of a type
  738. (such as BUFFERS) often means a list of objects of that type.
  739. Parameters named OBJECT may be of any type.  (*Note Lisp Data Types::,
  740. for a list of XEmacs object types.)  Parameters with other sorts of
  741. names (e.g., NEW-FILE) are discussed specifically in the description of
  742. the function.  In some sections, features common to parameters of
  743. several functions are described at the beginning.
  744.  
  745.    *Note Lambda Expressions::, for a more complete description of
  746. optional and rest arguments.
  747.  
  748.    Command, macro, and special form descriptions have the same format,
  749. but the word `Function' is replaced by `Command', `Macro', or `Special
  750. Form', respectively.  Commands are simply functions that may be called
  751. interactively; macros process their arguments differently from functions
  752. (the arguments are not evaluated), but are presented the same way.
  753.  
  754.    Special form descriptions use a more complex notation to specify
  755. optional and repeated parameters because they can break the argument
  756. list down into separate arguments in more complicated ways.
  757. ``[OPTIONAL-ARG]'' means that OPTIONAL-ARG is optional and
  758. `REPEATED-ARGS...' stands for zero or more arguments.  Parentheses are
  759. used when several arguments are grouped into additional levels of list
  760. structure.  Here is an example:
  761.  
  762.  - Special Form: count-loop (VAR [FROM TO [INC]]) BODY...
  763.      This imaginary special form implements a loop that executes the
  764.      BODY forms and then increments the variable VAR on each iteration.
  765.      On the first iteration, the variable has the value FROM; on
  766.      subsequent iterations, it is incremented by 1 (or by INC if that
  767.      is given).  The loop exits before executing BODY if VAR equals TO.
  768.      Here is an example:
  769.  
  770.           (count-loop (i 0 10)
  771.             (prin1 i) (princ " ")
  772.             (prin1 (aref vector i)) (terpri))
  773.  
  774.      If FROM and TO are omitted, then VAR is bound to `nil' before the
  775.      loop begins, and the loop exits if VAR is non-`nil' at the
  776.      beginning of an iteration.  Here is an example:
  777.  
  778.           (count-loop (done)
  779.             (if (pending)
  780.                 (fixit)
  781.               (setq done t)))
  782.  
  783.      In this special form, the arguments FROM and TO are optional, but
  784.      must both be present or both absent.  If they are present, INC may
  785.      optionally be specified as well.  These arguments are grouped with
  786.      the argument VAR into a list, to distinguish them from BODY, which
  787.      includes all remaining elements of the form.
  788.  
  789. 
  790. File: lispref.info,  Node: A Sample Variable Description,  Prev: A Sample Function Description,  Up: Format of Descriptions
  791.  
  792. A Sample Variable Description
  793. .............................
  794.  
  795.    A "variable" is a name that can hold a value.  Although any variable
  796. can be set by the user, certain variables that exist specifically so
  797. that users can change them are called "user options".  Ordinary
  798. variables and user options are described using a format like that for
  799. functions except that there are no arguments.
  800.  
  801.    Here is a description of the imaginary `electric-future-map'
  802. variable.
  803.  
  804.  - Variable: electric-future-map
  805.      The value of this variable is a full keymap used by Electric
  806.      Command Future mode.  The functions in this map allow you to edit
  807.      commands you have not yet thought about executing.
  808.  
  809.    User option descriptions have the same format, but `Variable' is
  810. replaced by `User Option'.
  811.  
  812. 
  813. File: lispref.info,  Node: Acknowledgements,  Prev: Conventions,  Up: Introduction
  814.  
  815. Acknowledgements
  816. ================
  817.  
  818.    This manual was based on the GNU Emacs Lisp Reference Manual, version
  819. 2.4, written by Robert Krawitz, Bil Lewis, Dan LaLiberte, Richard M.
  820. Stallman and Chris Welty, the volunteers of the GNU manual group, in an
  821. effort extending over several years.  Robert J. Chassell helped to
  822. review and edit the manual, with the support of the Defense Advanced
  823. Research Projects Agency, ARPA Order 6082, arranged by Warren A. Hunt,
  824. Jr. of Computational Logic, Inc.
  825.  
  826.    Ben Wing adapted this manual for XEmacs 19.14 and 20.0, and earlier
  827. for Lucid Emacs 19.10, XEmacs 19.12, and XEmacs 19.13.  He is the sole
  828. author of many of the manual sections, in particular the XEmacs-specific
  829. sections: events, faces, extents, glyphs, specifiers, toolbar, menubars,
  830. scrollbars, dialog boxes, devices, consoles, hash tables, range tables,
  831. char tables, databases, and others.  The section on annotations was
  832. originally written by Chuck Thompson.  Corrections to v3.1 were done by
  833. Martin Buchholz, Steve Baur, and Hrvoje Niksic.
  834.  
  835.    Corrections to the original GNU Emacs Lisp Reference Manual were
  836. supplied by Karl Berry, Jim Blandy, Bard Bloom, Stephane Boucher, David
  837. Boyes, Alan Carroll, Richard Davis, Lawrence R. Dodd, Peter Doornbosch,
  838. David A. Duff, Chris Eich, Beverly Erlebacher, David Eckelkamp, Ralf
  839. Fassel, Eirik Fuller, Stephen Gildea, Bob Glickstein, Eric Hanchrow,
  840. George Hartzell, Nathan Hess, Masayuki Ida, Dan Jacobson, Jak Kirman,
  841. Bob Knighten, Frederick M. Korz, Joe Lammens, Glenn M. Lewis, K. Richard
  842. Magill, Brian Marick, Roland McGrath, Skip Montanaro, John Gardiner
  843. Myers, Thomas A. Peterson, Francesco Potorti, Friedrich Pukelsheim,
  844. Arnold D. Robbins, Raul Rockwell, Per Starback, Shinichirou Sugou, Kimmo
  845. Suominen, Edward Tharp, Bill Trost, Rickard Westman, Jean White, Matthew
  846. Wilding, Carl Witty, Dale Worley, Rusty Wright, and David D. Zuhn.
  847.  
  848. 
  849. File: lispref.info,  Node: Lisp Data Types,  Next: Numbers,  Prev: Introduction,  Up: Top
  850.  
  851. Lisp Data Types
  852. ***************
  853.  
  854.    A Lisp "object" is a piece of data used and manipulated by Lisp
  855. programs.  For our purposes, a "type" or "data type" is a set of
  856. possible objects.
  857.  
  858.    Every object belongs to at least one type.  Objects of the same type
  859. have similar structures and may usually be used in the same contexts.
  860. Types can overlap, and objects can belong to two or more types.
  861. Consequently, we can ask whether an object belongs to a particular type,
  862. but not for "the" type of an object.
  863.  
  864.    A few fundamental object types are built into XEmacs.  These, from
  865. which all other types are constructed, are called "primitive types".
  866. Each object belongs to one and only one primitive type.  These types
  867. include "integer", "character" (starting with XEmacs 20.0), "float",
  868. "cons", "symbol", "string", "vector", "bit-vector", "subr",
  869. "compiled-function", "hashtable", "range-table", "char-table",
  870. "weak-list", and several special types, such as "buffer", that are
  871. related to editing.  (*Note Editing Types::.)
  872.  
  873.    Each primitive type has a corresponding Lisp function that checks
  874. whether an object is a member of that type.
  875.  
  876.    Note that Lisp is unlike many other languages in that Lisp objects
  877. are "self-typing": the primitive type of the object is implicit in the
  878. object itself.  For example, if an object is a vector, nothing can treat
  879. it as a number; Lisp knows it is a vector, not a number.
  880.  
  881.    In most languages, the programmer must declare the data type of each
  882. variable, and the type is known by the compiler but not represented in
  883. the data.  Such type declarations do not exist in XEmacs Lisp.  A Lisp
  884. variable can have any type of value, and it remembers whatever value
  885. you store in it, type and all.
  886.  
  887.    This chapter describes the purpose, printed representation, and read
  888. syntax of each of the standard types in Emacs Lisp.  Details on how to
  889. use these types can be found in later chapters.
  890.  
  891. * Menu:
  892.  
  893. * Printed Representation::      How Lisp objects are represented as text.
  894. * Comments::                    Comments and their formatting conventions.
  895. * Primitive Types::             List of all primitive types in XEmacs.
  896. * Programming Types::           Types found in all Lisp systems.
  897. * Editing Types::               Types specific to XEmacs.
  898. * Window-System Types::         Types specific to windowing systems.
  899. * Type Predicates::             Tests related to types.
  900. * Equality Predicates::         Tests of equality between any two objects.
  901.  
  902. 
  903. File: lispref.info,  Node: Printed Representation,  Next: Comments,  Up: Lisp Data Types
  904.  
  905. Printed Representation and Read Syntax
  906. ======================================
  907.  
  908.    The "printed representation" of an object is the format of the
  909. output generated by the Lisp printer (the function `prin1') for that
  910. object.  The "read syntax" of an object is the format of the input
  911. accepted by the Lisp reader (the function `read') for that object.
  912. Most objects have more than one possible read syntax.  Some types of
  913. object have no read syntax; except for these cases, the printed
  914. representation of an object is also a read syntax for it.
  915.  
  916.    In other languages, an expression is text; it has no other form.  In
  917. Lisp, an expression is primarily a Lisp object and only secondarily the
  918. text that is the object's read syntax.  Often there is no need to
  919. emphasize this distinction, but you must keep it in the back of your
  920. mind, or you will occasionally be very confused.
  921.  
  922.    Every type has a printed representation.  Some types have no read
  923. syntax, since it may not make sense to enter objects of these types
  924. directly in a Lisp program.  For example, the buffer type does not have
  925. a read syntax.  Objects of these types are printed in "hash notation":
  926. the characters `#<' followed by a descriptive string (typically the
  927. type name followed by the name of the object), and closed with a
  928. matching `>'.  Hash notation cannot be read at all, so the Lisp reader
  929. signals the error `invalid-read-syntax' whenever it encounters `#<'.
  930.  
  931.      (current-buffer)
  932.           => #<buffer "objects.texi">
  933.  
  934.    When you evaluate an expression interactively, the Lisp interpreter
  935. first reads the textual representation of it, producing a Lisp object,
  936. and then evaluates that object (*note Evaluation::.).  However,
  937. evaluation and reading are separate activities.  Reading returns the
  938. Lisp object represented by the text that is read; the object may or may
  939. not be evaluated later.  *Note Input Functions::, for a description of
  940. `read', the basic function for reading objects.
  941.  
  942. 
  943. File: lispref.info,  Node: Comments,  Next: Primitive Types,  Prev: Printed Representation,  Up: Lisp Data Types
  944.  
  945. Comments
  946. ========
  947.  
  948.    A "comment" is text that is written in a program only for the sake
  949. of humans that read the program, and that has no effect on the meaning
  950. of the program.  In Lisp, a semicolon (`;') starts a comment if it is
  951. not within a string or character constant.  The comment continues to
  952. the end of line.  The Lisp reader discards comments; they do not become
  953. part of the Lisp objects which represent the program within the Lisp
  954. system.
  955.  
  956.    The `#@COUNT' construct, which skips the next COUNT characters, is
  957. useful for program-generated comments containing binary data.  The
  958. XEmacs Lisp byte compiler uses this in its output files (*note Byte
  959. Compilation::.).  It isn't meant for source files, however.
  960.  
  961.    *Note Comment Tips::, for conventions for formatting comments.
  962.  
  963. 
  964. File: lispref.info,  Node: Primitive Types,  Next: Programming Types,  Prev: Comments,  Up: Lisp Data Types
  965.  
  966. Primitive Types
  967. ===============
  968.  
  969.    For reference, here is a list of all the primitive types that may
  970. exist in XEmacs.  Note that some of these types may not exist in some
  971. XEmacs executables; that depends on the options that XEmacs was
  972. configured with.
  973.  
  974.    * bit-vector
  975.  
  976.    * buffer
  977.  
  978.    * char-table
  979.  
  980.    * character
  981.  
  982.    * charset
  983.  
  984.    * coding-system
  985.  
  986.    * cons
  987.  
  988.    * color-instance
  989.  
  990.    * compiled-function
  991.  
  992.    * console
  993.  
  994.    * database
  995.  
  996.    * device
  997.  
  998.    * event
  999.  
  1000.    * extent
  1001.  
  1002.    * face
  1003.  
  1004.    * float
  1005.  
  1006.    * font-instance
  1007.  
  1008.    * frame
  1009.  
  1010.    * glyph
  1011.  
  1012.    * hashtable
  1013.  
  1014.    * image-instance
  1015.  
  1016.    * integer
  1017.  
  1018.    * keymap
  1019.  
  1020.    * marker
  1021.  
  1022.    * process
  1023.  
  1024.    * range-table
  1025.  
  1026.    * specifier
  1027.  
  1028.    * string
  1029.  
  1030.    * subr
  1031.  
  1032.    * subwindow
  1033.  
  1034.    * symbol
  1035.  
  1036.    * toolbar-button
  1037.  
  1038.    * tooltalk-message
  1039.  
  1040.    * tooltalk-pattern
  1041.  
  1042.    * vector
  1043.  
  1044.    * weak-list
  1045.  
  1046.    * window
  1047.  
  1048.    * window-configuration
  1049.  
  1050.    * x-resource
  1051.  
  1052.    In addition, the following special types are created internally but
  1053. will never be seen by Lisp code.  You may encounter them, however, if
  1054. you are debugging XEmacs.  The printed representation of these objects
  1055. begins `#<INTERNAL EMACS BUG', which indicates to the Lisp programmer
  1056. that he has found an internal bug in XEmacs if he ever encounters any
  1057. of these objects.
  1058.  
  1059.    * char-table-entry
  1060.  
  1061.    * command-builder
  1062.  
  1063.    * extent-auxiliary
  1064.  
  1065.    * extent-info
  1066.  
  1067.    * lcrecord-list
  1068.  
  1069.    * lstream
  1070.  
  1071.    * opaque
  1072.  
  1073.    * opaque-list
  1074.  
  1075.    * popup-data
  1076.  
  1077.    * symbol-value-buffer-local
  1078.  
  1079.    * symbol-value-forward
  1080.  
  1081.    * symbol-value-lisp-magic
  1082.  
  1083.    * symbol-value-varalias
  1084.  
  1085.    * toolbar-data
  1086.  
  1087. 
  1088. File: lispref.info,  Node: Programming Types,  Next: Editing Types,  Prev: Primitive Types,  Up: Lisp Data Types
  1089.  
  1090. Programming Types
  1091. =================
  1092.  
  1093.    There are two general categories of types in XEmacs Lisp: those
  1094. having to do with Lisp programming, and those having to do with
  1095. editing.  The former exist in many Lisp implementations, in one form or
  1096. another.  The latter are unique to XEmacs Lisp.
  1097.  
  1098. * Menu:
  1099.  
  1100. * Integer Type::        Numbers without fractional parts.
  1101. * Floating Point Type:: Numbers with fractional parts and with a large range.
  1102. * Character Type::      The representation of letters, numbers and
  1103.                         control characters.
  1104. * Symbol Type::         A multi-use object that refers to a function,
  1105.                         variable, or property list, and has a unique identity.
  1106. * Sequence Type::       Both lists and arrays are classified as sequences.
  1107. * Cons Cell Type::      Cons cells, and lists (which are made from cons cells).
  1108. * Array Type::          Arrays include strings and vectors.
  1109. * String Type::         An (efficient) array of characters.
  1110. * Vector Type::         One-dimensional arrays.
  1111. * Bit Vector Type::     An (efficient) array of bits.
  1112. * Function Type::       A piece of executable code you can call from elsewhere.
  1113. * Macro Type::          A method of expanding an expression into another
  1114.                           expression, more fundamental but less pretty.
  1115. * Primitive Function Type::     A function written in C, callable from Lisp.
  1116. * Compiled-Function Type::      A function written in Lisp, then compiled.
  1117. * Autoload Type::       A type used for automatically loading seldom-used
  1118.                         functions.
  1119. * Char Table Type::     A mapping from characters to Lisp objects.
  1120. * Hash Table Type::     A fast mapping between Lisp objects.
  1121. * Range Table Type::    A mapping from ranges of integers to Lisp objects.
  1122. * Weak List Type::      A list with special garbage-collection properties.
  1123.  
  1124. 
  1125. File: lispref.info,  Node: Integer Type,  Next: Floating Point Type,  Up: Programming Types
  1126.  
  1127. Integer Type
  1128. ------------
  1129.  
  1130.    The range of values for integers in XEmacs Lisp is -134217728 to
  1131. 134217727 (28 bits; i.e., -2**27 to 2**27 - 1) on most machines.  (Some
  1132. machines, in particular 64-bit machines such as the DEC Alpha, may
  1133. provide a wider range.)  It is important to note that the XEmacs Lisp
  1134. arithmetic functions do not check for overflow.  Thus `(1+ 134217727)'
  1135. is -134217728 on most machines. (However, you *will* get an error if
  1136. you attempt to read an out-of-range number using the Lisp reader.)
  1137.  
  1138.    The read syntax for integers is a sequence of (base ten) digits with
  1139. an optional sign at the beginning. (The printed representation produced
  1140. by the Lisp interpreter never has a leading `+'.)
  1141.  
  1142.      -1               ; The integer -1.
  1143.      1                ; The integer 1.
  1144.      +1               ; Also the integer 1.
  1145.      268435457        ; Causes an error on a 28-bit implementation.
  1146.  
  1147.    *Note Numbers::, for more information.
  1148.  
  1149. 
  1150. File: lispref.info,  Node: Floating Point Type,  Next: Character Type,  Prev: Integer Type,  Up: Programming Types
  1151.  
  1152. Floating Point Type
  1153. -------------------
  1154.  
  1155.    XEmacs supports floating point numbers.  The precise range of
  1156. floating point numbers is machine-specific.
  1157.  
  1158.    The printed representation for floating point numbers requires either
  1159. a decimal point (with at least one digit following), an exponent, or
  1160. both.  For example, `1500.0', `15e2', `15.0e2', `1.5e3', and `.15e4'
  1161. are five ways of writing a floating point number whose value is 1500.
  1162. They are all equivalent.
  1163.  
  1164.    *Note Numbers::, for more information.
  1165.  
  1166.